package com.yqy.controller;

import com.yqy.entity.StudentInfoPo;
import com.yqy.mapper.StudentInfoMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author yiqianyi
 * @version 1.0
 * @date 2022-03-19 13:45
 */
@RestController
@CrossOrigin
@Api(tags = {"首页控制层"})
public class IndexController {
    @Autowired
    private StudentInfoMapper studentInfoMapper;

    @GetMapping("/student/info/byAddress")
    @ApiOperation(value = "首页获取所有学生生源地市统计", notes = "/student/info/byAddress")
    public List<StudentInfoPo> findStudentInfoBybyAddress() {
        return studentInfoMapper.findUserByAddressCount();
    }
}
